var core = require('core');
var db = core.db;
var send = core.send;

var set = function(req, res, next){

    var body = req.body;
    var order = new db.schema.Order(body);
    order.save(function(err, doc){
        if(err){
            SEND = new send(100001);
            res.send(SEND);
        }else{
            SEND = new send(0);
            SEND.docs = doc;
            res.send(SEND);
        }
    });

};

module.exports = set;
